define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Live800, $window, $sce, $timeout, GoPage, GoDialog) {
		//页面离开，分享关闭
		$scope.$on('$ionicView.afterEnter', function() {
			$scope.loadIframe();
			//动态设置高度
			GoPage.init_top($scope, 0, 0);
		}, false);
		$scope.loadIframe = function() {
			var url = 'https://v1.live800.com/live800/chatClient/chatbox.jsp?companyID=833110&configID=43818&jid=4732563954&s=1';
			$scope.myURL = $sce.trustAsResourceUrl(url);
		};
	}

	controller.$inject = ['$scope', 'Live800', '$window', '$sce', '$timeout', 'GoPage', 'GoDialog'];

	return app.registerController("live800ctrl", controller);
});